package com.xc.c1

object apply01 {
  def main(args: Array[String]): Unit = {
    val point01 = point(1, 2)
    point01.info
  }
}

class point(x1: Int, y1: Int) {
  var x: Int = x1
  var y: Int = y1

  def info: Unit = {
    println(s"point: x = $x , y=$y ")
  }

}

object point {
  def apply(x: Int, y: Int): point = new point(x, y)
}

